<?php
class Resources_model extends CI_Model{
	public function __construct(){
		$this->load->database();
	}
	
	//所有素材
	public function lists($data){
		$query = $this->db->get_where('resource',$data);
		return $query->result_array();
	}
	
	//添加素材
	public function add($data){
		if($this->db->insert('resource',$data)){
		
			return true;
		}
		return false;
	}
}
?>